using System;
using System.Data;
using System.Collections.Generic;
using System.Collections;
using log4net;
using FSS.BLL.Entities;
namespace FSS.BLL.Services
{
	#region UnitService

	/// <summary>
	/// UnitService object for Ibatis mapped table 'Unit'.
	/// </summary>
	public class UnitService : IUnitService
	{
		private static readonly ILog log = LogManager.GetLogger(typeof(UnitService).Name);
	  	private static volatile UnitService _UnitService = null;
        public static UnitService GetInstance()
        {
            if (_UnitService == null)
            {
                lock (typeof(UnitService))
                {
                    if (_UnitService == null) // double-check
                        _UnitService = new UnitService();
                }
            }
            return _UnitService;
        }
		public UnitService()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public int UnitUpdateCheck(UnitEntity objE)
        {
            try
            {
                ExecuteUpdate("UnitUpdateCheck", objE);
                return 1;
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return 0;
            }
        }
	}
	#endregion  
}
